-- GENERATED SPELL FOR [Twilight Frost Mage] --


function spell0_33819(pUnit, Event) --@Arcane Burst,Self--
pUnit:FullCastSpellOnTarget(64663,pUnit)
pUnit:RegisterEvent('Sorts_33819', 10252, 1)
end

function spell1_33819(pUnit, Event) --@Blink,n/a--
pUnit:FullCastSpellOnTarget(64662,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_33819', 1000, 1)
end

function spell2_33819(pUnit, Event) --@Frost Bolt Volley,n/a--
pUnit:FullCastSpellOnTarget(63758,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_33819', 2000, 1)
end

function spell3_33819(pUnit, Event) --@Frost Nova,Self--
pUnit:FullCastSpellOnTarget(63912,pUnit)
pUnit:RegisterEvent('Sorts_33819', 8281, 1)
end

function spell4_33819(pUnit, Event) --@Frostbolt,n/a--
pUnit:FullCastSpellOnTarget(63913,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_33819', 6000, 1)
end

function Sorts_33819(pUnit, Event)
local choix_sorts_33819 = math.random(0, 4)
if choix_sorts_33819 == 0 then
pUnit:RegisterEvent('spell0_33819', 1, 1)
end
if choix_sorts_33819 == 1 then
pUnit:RegisterEvent('spell1_33819', 1, 1)
end
if choix_sorts_33819 == 2 then
pUnit:RegisterEvent('spell2_33819', 1, 1)
end
if choix_sorts_33819 == 3 then
pUnit:RegisterEvent('spell3_33819', 1, 1)
end
if choix_sorts_33819 == 4 then
pUnit:RegisterEvent('spell4_33819', 1, 1)
end
end

function mob33819_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_33819', math.random(1500, 3000), 1)
end

function mob33819_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob33819_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob33819_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(33819, 1, 'mob33819_Action')
RegisterUnitEvent(33819, 2, 'mob33819_Leave')
RegisterUnitEvent(33819, 3, 'mob33819_Kill')
RegisterUnitEvent(33819, 4, 'mob33819_Die')
